<script>
import {defineComponent} from 'vue'
import txtInput from "@/components/base/txt-input/index.vue";
import {code,box} from "@/api/sec_code";

export default defineComponent({
  data() {
    return {
      code: null,
      codeInfo:{}
    }
  },
  created() {
    this.code = this.$route.query.code
    if (this.$route.meta.box) { //盒码
      code(this.code).then(res=>{
        this.codeInfo = res.data
      })
    }else {
      box(this.code).then(res=>{
        this.codeInfo = res.data
      })
    }
  },
  components: {
    txtInput
  }
})
</script>

<template>
  <div class="code">
    <txt-input disabled="true" label="公司名称" value="湖南社集优选电子商务有限公司"></txt-input>
    <txt-input label="产品编号" :value="codeInfo.code"></txt-input>
    <txt-input label="指定销售" :value="codeInfo.name"></txt-input>
    <txt-input label="销售编号" :value="codeInfo.userCode"></txt-input>
    <txt-input label="绑定时间" :value="codeInfo.time"></txt-input>
    <txt-input label="查询次数" :value="codeInfo.num"></txt-input>
<!--    <txt-input label="上次时间" :value="codeInfo.lastTime"></txt-input>-->
  </div>
</template>

<style scoped lang="stylus">

</style>